;;; guix-config --- additional software for a custom configuration of gnu-guix
;;; Copyright © 2020 Kolya <kolya.daemon@vfemail.net>
;;;
;;; This file is part of guix-config
;;;
;;; guix-config is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; guix-config is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (kolyad systems workstation-desktop)
  #:use-module ((kolyad etc workstation) #:prefix etc:)
  #:use-module (kolyad packages linux)
  #:use-module (kolyad systems workstation)
  #:use-module (gnu system)
  #:use-module (gnu system file-systems)
  #:use-module (nongnu packages linux)
  #:use-module (nongnu system linux-initrd))

(operating-system
  (host-name "void")
  (timezone  "America/Chicago")
  (locale    "en_US.utf8")
  (issue     "kolyad-guix")

  (users        %workstation-user-accounts)
  (groups       %workstation-user-groups)
  (sudoers-file etc:%sudoers-file)
  (skeletons    %workstation-skeletons)

  (kernel linux-nonfree-workstation-thinkpad-x1c5)
  (kernel-arguments '("quiet"))
  (kernel-loadable-modules '())

  (initrd         microcode-initrd)
  (initrd-modules
    (list "ahci"                                      ; for SATA controllers
          "usb-storage" "uas"                         ; for the installation image etc.
          "usbhid" "hid-generic" "hid-apple"          ; keyboards during early boot
          "dm-crypt" "xts" "serpent_generic" "wp512"  ; for encrypted root partitions
          "nls_iso8859-1"                             ; for `mkfs.fat`, et.al
          "virtio_pci" "virtio_balloon"               ; Modules for Linux para-virtualized devices, for use in QEMU guests.
          "virtio_blk" "virtio_net" "virtio-rng"
          "serpent-avx2"))                            ; FIXME: This _specifically_ is required for booting. Booting
                                                      ;   w/ all dependencies if this module bar itself will fail
                                                      ;   & return a kernel crypto failure msg.

  (bootloader %workstation-bootloader)
  (firmware   (append (list iwlwifi-firmware)
                       %base-firmware))

  (mapped-devices
    (list %workstation-syscrypt))
  (file-systems
    (cons* %workstation-root-file-system
           %workstation-gnu-file-system
           %workstation-var-file-system
           %workstation-swap-file-system
           %workstation-home-file-system
           %workstation-esp-file-system
           %base-file-systems))
  (swap-devices
    (list %workstation-swap-space))

  (packages %workstation-packages)

  (services
    (append
      %workstation-desktop-services
      %workstation-sysctl-services
      %workstation-services)))

;;; vim: set expandtab tabstop=2 shiftwidth=2
;;; end of file workstation-desktop.scm
